package com.care.doctor.server.service.impl;

import com.care.common.core.domain.Result;
import com.care.doctor.common.domain.DTODoctorType;
import com.care.doctor.common.req.GetDoctorReq;
import com.care.doctor.common.req.ListReq;
import com.care.doctor.server.mapper.DoctorTypeMapper;
import com.care.doctor.server.service.DoctorService;
import com.care.doctor.server.service.DoctorTypeService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 靳家振
 * @Date: 2024/3/22 21:43
 * @Description:
 **/

@Service
public class DoctorTypeServiceImpl implements DoctorTypeService {

    @Autowired
    private DoctorTypeMapper mapper;
    @Override
    public Result<PageInfo<DTODoctorType>> findDoctorType(ListReq req) {
        PageHelper.startPage (req.getPageNum (),req.getPageSize ());
        Page<DTODoctorType> page = mapper.findDoctorType (req);
        PageInfo<DTODoctorType> info = new PageInfo<> (page);
        return Result.success (info);
    }


}
